﻿@model Century.Common.Enumerations.SitePageParameterType
@{
    Layout = null;    
}

@if (Century.Business.Repository.PersistData.CurrentPage.SitePageParameters != null && Century.Business.Repository.PersistData.CurrentPage.SitePageParameters.Where(p => p.ParamType == (int)Model).ToList().Count > 0)
{
    foreach (Century.Models.Common.SitePageParameter param in Century.Business.Repository.PersistData.CurrentPage.SitePageParameters.Where(p => p.ParamType == (int)Model))
    {
        <text>
        <li>
            <img src="@Url.Content("~/Content/themes/admin/img/general/cancel.png")" alt="Delete" id="@(param.Id)" onclick="DeleteSitePageParameter('@(param.Id)');">
            @(param.ParamName) - 
            @if(Model == Century.Common.Enumerations.SitePageParameterType.Css || Model == Century.Common.Enumerations.SitePageParameterType.Js){ 
                <text>
                    <a href="@(param.ParamValue)" target="_blank" style="color: Blue" onclick="return confirm('Are you sure want to delete ?');">@(param.ParamValue)</a>
                </text>
            }else{ 
                @(param.ParamValue)
            }
        </li>
        </text>
    }
} else {
    <text>There is no record.</text>
}
